package com.library.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.library.common.annotation.Excel;
import com.library.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 图书馆图书表 bo_book
 *
 * @author whj
 * @date 2020-01-18
 */
@Data
public class BoBook extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Integer id;
    /**
     * 图书名称
     */
    private String bookName;
    /**
     * 图书编码
     */
    private String bookNo;
    /**
     * 图书状态
     */
    private String bookStatus;
    /**
     * 图书类型
     */
    private Integer bookType;
    /**
     * 书柜位置
     */
    private String bookColumn;
    /**
     * 书柜层数
     */
    private String bookLayer;
    /**
     * 图书录入人
     */
    private String userId;
    /**
     * 扩展字段1
     */
    private String ext1;
    /**
     * 扩展字段2
     */
    private String ext2;
    /**
     * 扩展字段3
     */
    private String ext3;
    /**
     * 出版社
     */
    @Excel(name = "出版社")
    private String press;

    /**
     * 出版时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出版时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date pressTime;

    /**
     * 品牌
     */
    @Excel(name = "品牌")
    private String brand;
    /**
     * 作者
     */
    private String author;

    /**
     * 用纸
     */
    @Excel(name = "用纸")
    private String paper;

    /**
     * 开本
     */
    @Excel(name = "开本")
    private String bookSize;

    /**
     * 页码
     */
    @Excel(name = "页码")
    private Long pageNumber;

    /**
     * 图书推荐
     */
    @Excel(name = "图书推荐")
    private String bookRecommended;

    /**
     * 内容简介
     */
    @Excel(name = "内容简介")
    private String bookDescription;

    /**
     * 封面图片
     */
    @Excel(name = "封面图片")
    private String bookCoverPhoto;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("bookName", getBookName())
                .append("bookNo", getBookNo())
                .append("bookStatus", getBookStatus())
                .append("bookType", getBookType())
                .append("bookColumn", getBookColumn())
                .append("bookLayer", getBookLayer())
                .append("userId", getUserId())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("ext1", getExt1())
                .append("ext2", getExt2())
                .append("ext3", getExt3())
                .toString();
    }
}
